<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
      + path + "/";
%>
<head>
<base href="<%=basePath%>">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="format-detection" content="telephone=no">
  <title>订单详情</title>
  <script src="static/js/lib/cssrem.js"></script>
<link href="static/css/style.css" rel="stylesheet"></head>

<body>
  <div class="content">
    <div class="wrapper">
      <!-- 订单状态 -->
      <div class="order-status dib__vm">
        <!-- 01 - 待付款 -->
        <!-- 02 - 待发货 -->
        <!-- 03 - 待收货 -->
        <!-- 04 - 已完成 -->
        <!-- 05 - 已取消 -->
        <!-- 06 - 已退款 -->
        <c:if test="${orderDetail.state == '00'}">
	        <i class="order-status-icon icon-status-02 dib vm"></i>
	        <div class="dib vm">
	          <p class="white ml20 f32 b">等待买家付款</p>
	          <p class="white ml20 f26 mt10 b">交易将在6小时后关闭</p>
	        </div>
        </c:if>
        <c:if test="${orderDetail.state == '01'}">
	        <i class="order-status-icon icon-status-01 dib vm"></i>
	        <div class="dib vm">
	          <p class="white ml20 f32 b">等待卖家发货</p>
	        </div>
        </c:if>
        <c:if test="${orderDetail.state == '03'}">
	        <i class="order-status-icon icon-status-03 dib vm"></i>
	        <div class="dib vm">
	          <p class="white ml20 f32 b">等待买家收货</p>
	        </div>
        </c:if>
        <c:if test="${orderDetail.state == '04'}">
	        <i class="order-status-icon icon-status-04 dib vm"></i>
	        <div class="dib vm">
	          <p class="white ml20 f32 b">买家已收货</p>
	        </div>
        </c:if>
        <c:if test="${orderDetail.state == '05'}">
	        <i class="order-status-icon icon-status-05 dib vm"></i>
	        <div class="dib vm">
	          <p class="white ml20 f32 b">买家取消订单</p>
	        </div>
        </c:if>
        <c:if test="${orderDetail.state == '06'}">
	        <i class="order-status-icon icon-status-05 dib vm"></i>
	        <div class="dib vm">
	          <p class="white ml20 f32 b">已退款</p>
	        </div>
        </c:if>
      </div>
      <!-- 收货地址 -->
      <dl class="shipping-address bgwh">
        <dt class="f26 b"><span>${orderDetail.address.address }</span><span>${orderDetail.address.phone }</span></dt>
        <dd class="f24">收货地址：${orderDetail.address.provinceName }${orderDetail.address.cityName }${orderDetail.address.countryName }${orderDetail.address.address }</dd>
      </dl>
      <!-- 订单商品 -->
      <div class="order-list mt20 bgwh">
      <c:forEach items="${orderDetail.goodsList}" var="good" varStatus="gd">
        <div class="cell pt20 pb20 ui-1px-t">
          <div class="cell__hd photo100 photo__goods">
            <img src="${good.goodsThumb }" alt="">
          </div>
          <div class="cell__bd f28 pl20 g3">
            <p class="f26">${good.title }</p>
            <div class="clearfix pt10">
              <span class="text-primary b l"><em class="f26">￥</em><em class="f30">${good.tradePrice }</em><em class="f26">/${good.buyUnit }</em></span>
              <span class="r f26 g9">${good.number }</span>
            </div>
          </div>
          <div class="cell__fd b f26 text-danger"></div>
        </div>
       </c:forEach>
      </div>
      <!-- 时间轴 -->
      <div class="timeline f26 mt20">
        <p>订单编号：${orderDetail.orderCode }</p>
        <p>下单时间：${orderDetail.createTime }</p>
        <p>预计发货时间：${orderDetail.expectDeliveryTime }</p>
      </div>
      <!-- 支付信息 -->
      <dl class="pay-info f26 mt20">
        <dd class="pay-info-item">
          <span class="title">支付类型：</span>
          <span class="valuer">${orderDetail.payType }</span>
        </dd>
        <dd class="pay-info-item">
          <span class="title">户名：</span>
          <span class="valuer">${orderDetail.account.companyName }</span>
        </dd>
        <dd class="pay-info-item">
          <span class="title">账号：</span>
          <span class="valuer">${orderDetail.account.account }</span>
        </dd>
        <dd class="pay-info-item">
          <span class="title">开户行：</span>
          <span class="valuer">${orderDetail.account.openingBank }</span>
        </dd>
        <dd class="pay-info-item">
          <span class="title">汇付识别码：</span>
          <span class="valuer text-danger">${orderDetail.remittanceCode }</span>
        </dd>
      </dl>
      <!-- 配送方式 -->
      <div class="haul f26 mt20">
        <p>配送方式：冷链物流</p>
      </div>
      <!-- 发票 -->
      <div class="invoice f26 mt20">
				<c:if test="${orderDetail.invoice.type=='00' }">
					<p>发票抬头类型：个人</p>
				</c:if>
				<c:if test="${orderDetail.invoice.type=='01' }">
					<p>发票抬头类型：公司</p>
				</c:if>
				<p>发票抬头名称：${orderDetail.invoice.name }</p>
      </div>
      <!-- 最终价格 -->
      <div class="price f26 mt20">
        <div class="clearfix">
          <span class="l">商品总额：</span><span class="r">￥${orderDetail.totalPrice }</span>
        </div>
        <div class="clearfix">
          <span class="l">&emsp;已付款：</span><span class="r text-primary">￥￥${orderDetail.realPrice }</span>
        </div>
      </div>
      <div class="cell pt20 pb20 mt20 bgwh ge ui-1px-t ui-1px-b">
        <div class="cell__bd f28 g3 tr">
          <!-- <a class="btn dib f24 g3 mr20" href="javascript:;">支付凭证</a>
          <a class="btn dib f24 g3 mr20" href="javascript:;">确认付款</a> -->
        </div>
      </div>
      <div class="pt20"></div>
    </div>
  </div>
<script type="text/javascript" src="static/js/lib/vendor.js"></script>
<script type="text/javascript" src="static/js/lib/app.js"></script>
</body>

</html>
